<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>zuzhizuire.html</title>
    <link rel="stylesheet" href="../../css/postlist/zuiretiezi.css">
    <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
    <script type="text/javascript" src="../js/postlist/zuixinfabiao.js"></script>
    <script>
        // $(function() {
        //     if (localStorage.getItem('select')) {
        //         $("#select option").eq(localStorage.getItem('select')).prop('selected', true);
        //     }
        //
        //     $("#select").on('change', function() {
        //         localStorage.setItem('select', $('option:selected', this).index());
        //     });
        // });

        window.onload=function () {
            $(".select").click(function f1() {
                var selectMes = $('#dgroup option:selected') .val();//选中的值
                $.get('/zmpost/zuzhizuire',{selectMes:selectMes},function (back) {

                });
            });
        }
    </script>
</head>
<body>
<div id="content">
    <form th:action="@{zuzhizuire}" method="get" >
        <span>党支部：</span>
        <select name="gid" id="select" class="input-select" th:onchange="changeProgram()" >
<!--            <option value="">&#45;&#45;请选择&#45;&#45;</option>-->
            <option th:each="zmpost,zmpostStat:${zmpost}" th:value="${zmpost.gid}" th:text="${zmpost.gname}" th:name="${zmpost.gid}" ></option>
        </select>
        <input class="select" type="submit" value="搜索" onclick="f1()">
    </form>

    <table id="adminTbody" class="hovertable" th:width="1200">
        <tr class="table_header">
            <th th:style="'display:none'">帖子ID</th>
            <th th:style="'display:none'">帖子状态</th>
            <th>标题</th>
            <th>类型</th>
            <th>作者</th>
            <th>点赞</th>
            <th>收藏</th>
            <th>发表时间</th>
        </tr>
        <tr th:each="zmpost,zmpostStat : ${zmposts}" class="tbody" onmouseover="this.style.backgroundColor='lightslategray';" onmouseout="this.style.backgroundColor='#FFFFFF';">
            <td th:text="${zmpost.pid}" th:style="'display:none'"></td>
            <td th:text="${zmpost.pstatus}" th:style="'display:none'"></td>
            <td><a th:href="@{'http://localhost:8080/html/editor/viewPost.do?pid=' + ${zmpost.pid}}" target="main"  th:text="${zmpost.ptitle}" style="color: black;text-decoration: none;"></a></td>
            <td th:text="${zmpost.ptype}"></td>
            <td th:text="${zmpost.username}"></td>
            <td th:text="${zmpost.giveup}"></td>
            <td th:text="${zmpost.collect}"></td>
            <td th:text="${zmpost.ptime}"></td>
        </tr>
    </table>
    <div class="layui-card-body ">
        <div class="page">
            <div id="page">
                <a class="num" href="###" id="firstPage">首页</a>
                <a class="prev" href="###" id="prePage">上一页</a>
                <span class="current" id="currentPage"></span>
                <a class="next" href="###"id="nextPage">下一页</a>
                <a class="num" href="###" id="lastPage">尾页</a>
                <a class="num" href="###" id="totalpage"></a>
                <a class="num"> <select  id="jumpWhere"> </select></a>
                <a href="###" id="jumpPage" onclick="jumpPage()">跳转</a>
                <a class="num" id="countsum"></a>
            </div>
        </div>
    </div>
</div>
</body>
</html>